#include "QTexture.h"

QTexture::QTexture(QWidget *parent) :
    QGLWidget(parent)
{

}
//
//bool QTexture::LoadT8(GLuint &texture, char *filename)
//{
//    texture = bindTexture(QPixmap(filename));
//    glGenTextures(1, &texture);
//    glBindTexture(GL_TEXTURE_2D, texture);
////    gluBuild2DMipmaps(GL_TEXTURE_2D, 4, pImage->sizeX,
////            pImage->sizeY, GL_RGB, GL_UNSIGNED_BYTE, pImage->data);
//    return true;
//}
//
GLuint QTexture::LoadT8(QString filename)
{
    m_texture = bindTexture(QPixmap(filename));
    //glGenTextures(1, &texture);
    //glBindTexture(GL_TEXTURE_2D, texture);
//    gluBuild2DMipmaps(GL_TEXTURE_2D, 4, pImage->sizeX,
//            pImage->sizeY, GL_RGB, GL_UNSIGNED_BYTE, pImage->data);
    return m_texture;
}
